package org.xdemo.example.Utils;

import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * Created by kz on 2017/8/23.
 */

//以下方法针对每个COMPONENT来设置启动和结束动作

@Service
public class GlobalInspector {
    /**

     * 在web启动时执行

     */

    @PostConstruct

    public void applicationStart(){

        System.out.println("application start");

    }



    /**

     * 在web结束时执行

     */

    @PreDestroy

    public void applicationEnd(){

        System.out.println("InskyScheduleCenter application end");



    }

}
